Please refer to the online GPFS FAQ at

    http://www.ibm.com/servers/eserver/clusters/software/gpfs_faq.html

for the latest information about supported kernel levels and patches
before building the portability layer.

Linux kernel patches for GPFS can be obtained at

    http://www-124.ibm.com/linux/patches/

under the project: "General Parallel File System (GPFS) Linux Kernel
Patches."


To build a custom Linux portability interface for GPFS
------------------------------------------------------

It is strongly suggested that you build the source at
non-root level; you will need to change the owner/group
permissions accordingly in /usr/lpp/mmfs/src. 

When you build as a non root user it is also important 
that you have read access to the linux kernel header files 
on your machine.  These headers are normally found in 
/usr/src/linux/include but may appear in a different
place as enumerated below in step 3 section d.

1) export SHARKCLONEROOT=/usr/lpp/mmfs/src
2) cd config
   cp site.mcr.proto site.mcr

3) Edit and customize the site.mcr file.

   a) Uncomment the CUSTOM_LINUX_BUILD define in the site.mcr file.

   b) Modify the LINUX_KERNEL_VERSION to an appropriate value for your
      kernel.  Comments within site.mcr explain the format.  Current
      known levels are 

      /* Redhat kernel version linux-2.4.2-2 */
      #define LINUX_KERNEL_VERSION 2040202  

      /* Redhat kernel version linux-2.4.3-12 */
      #define LINUX_KERNEL_VERSION 2040312  
 
      /* Redhat kernel version linux-2.4.7-10 */
      #define LINUX_KERNEL_VERSION 2040710  

      /* Redhat kernel version linux-2.4.9-7 */
      #define LINUX_KERNEL_VERSION 2040907

      /* Redhat kernel version linux-2.4.9-12 */
      #define LINUX_KERNEL_VERSION 2040912

      /* Redhat kernel version linux-2.4.9-13 */
      #define LINUX_KERNEL_VERSION 2040913

      /* Redhat kernel version linux-2.4.9-21 */
      #define LINUX_KERNEL_VERSION 2040921

      /* Redhat kernel version linux-2.4.9-31 */
      #define LINUX_KERNEL_VERSION 2040931

      /* Redhat kernel version linux-2.4.9-34 */
      #define LINUX_KERNEL_VERSION 2040934

      /* Redhat kernel version linux-2.4.18-3 */
      #define LINUX_KERNEL_VERSION 2041803

      /* Redhat kernel version linux-2.4.18-4 */
      #define LINUX_KERNEL_VERSION 2041804

      /* Redhat kernel version linux-2.4.18-5 */
      #define LINUX_KERNEL_VERSION 2041805

   c) Note the architecture type and ensure you modify the appropriate
      section.  Currently the valid choice is the GPFS_ARCH_I386 section.

   d) Note also that the kernel header file search path, 
      KERNEL_HEADER_DIR, is by default /usr/src/linux/include. 
      The kernel headers should either be located in this directory 
      (directly or via a link to /usr/src/linux) or else KERNEL_HEADER_DIR 
      should be modified to indicate the proper include location.
      You must have read access to these headers!

   e) Uncomment any desired Linux kernel patches listed under
      LINUX_PATCH_DEFINES. The kernel will also need to be rebuilt and
      installed with the appropriate patches, which can be obtained from
      http://www-124.ibm.com/linux/patches/.
      The online GPFS FAQ has detailed information on each patch.

4) cd ..
5) make World

All of the kernel modules and libraries reside in the "bin" subdirectory
after the build.


To install the Linux portability interface for GPFS into /usr/lpp/mmfs/bin
--------------------------------------------------------------------------

This step installs the custom mmfslinux kernel module.

1) su
2) make InstallImages

   The file /usr/lpp/mmfs/bin/mmfslinux will be installed.  If
   this kernel configuration applies to other machines in the 
   cluster, you may then copy /usr/lpp/mmfs/bin/mmfslinux to those 
   machines, or iteratively perform the above compile and install 
   steps on each machine.


Additional Notes
----------------

Most of the source code headers are in the "ibm-kxi" and "ibm-linux"
directories, while the source code is in the "gpl-linux" directory.

The "config" directory provides the configuration information for the
build (site.mcr) and the "misc" directory handles some items that allow
us to reuse our standard development Imakefiles.

